package 用类模拟枚举;

/**
 * @author DGW-PC
 * @data   2018年10月4日
 */
public class enumTest {
	
	// 用于测试的选项
	public enum test{thueday,friday}
	
	public static void main(String[] args) {
	     Week3 one=Week3.MON;
	     one.show();
	     System.out.println(Day.monday.getDeclaringClass());
	     System.out.println(Day.monday.name());
	     System.out.println(Day.monday.ordinal());
	     
	     // valueof 目的就是遍历当前的数据 是否在枚举类型中已经包含
	     Day of = Day.valueOf("monday2");
	     
	}

	@SuppressWarnings("unused")
	private static void demo2() {
		Week2 one=Week2.MON;
		Week2 one2=Week2.TUE;
		System.out.println(one.getName());
		System.out.println(one2.getName());
	}

	@SuppressWarnings("unused")
	private static void demo1() {
		Week one = Week.MON;
		Week one2 = Week.TUE;
		Week one3 = Week.WED;
		System.out.println(one3.toString());
	}

}
